<?php
require 'init.php';

$str_entry_ids = $argv[1];
$entry_ids = explode(",", $str_entry_ids);
$post_db = new Core_Model_DbTable_Posts();

$post_details = $post_db->getDetail($entry_ids);

$user_actions_db = new Core_Model_DbTable_UserActions();
$user_actions_db->insertActions($post_details, POST);

$total_actions_db = new Core_Model_DbTable_TotalActions();
$total_actions_db->insertActions($post_details, POST);

$buffer_post_db = new Core_Model_DbTable_BufferPosts();
$buffer_post_db->deleteBatch($entry_ids);
?>
